﻿<%@ Page Language="C#" MasterPageFile="~/Front/Site.Master" AutoEventWireup="true" CodeBehind="Group.aspx.cs" Inherits="VK.Casemeet.Web.Front.Group" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<%@ Import Namespace="VK.Comm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentHead" runat="server">
    <link href="/Front/css/style.css" type="text/css" rel="stylesheet" charset="utf-8">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentBody" runat="server">
<div id="content_width">
		<!------banner------>
		<div id="info_banner"><img src="/Front/images/info_banner.jpg"/></div>
		<!----首页内容-----> 
        <div id="content">
			<div id="sidebar">
				<div class="tuan_classi bg border">
					<div class="title bluetitle"><h3>团购分类</h3><div class="clear"></div></div>
					<asp:Repeater runat="server" ID="repCategoris">
                        <HeaderTemplate><ul class="nav"></HeaderTemplate>
                        <ItemTemplate>
                            <li><a title='<%#Eval("gc_name")%>' href='/<% =(Master as VK.Casemeet.Web.Front.Site).GetCurrentAreaID() %>/Group.html?gcid=<%#Eval("gc_id")%>' class='<%# (((int)Eval("gc_id")) == gcid ? "click" : string.Empty) %>'><%#Util.VisibleString(Eval("gc_name").ToString())%></a></li>
                        </ItemTemplate>
                        <FooterTemplate></ul></FooterTemplate>
                    </asp:Repeater>
				</div>
				<!----contact_us <div class="contact_us bg border spacing"></div>---->
			</div>
			<div id="main">
				<div class="breadcrumbs border">
					<div class="title graytitle"><p>当前位置 &gt;  <a href="/Default_<% =(Master as VK.Casemeet.Web.Front.Site).GetAreaUrl() %>.html">首页</a> &gt; 团购</p></div>
				</div>
				<div class="tuan_list bg border spacing">
                    <asp:Repeater runat="server" ID="repGroups">
                    <HeaderTemplate><ul></HeaderTemplate>
                    <ItemTemplate>
                        <li class="tuan_box">
							<div class="tuan_info">
								<h3><a href='/<% =(Master as VK.Casemeet.Web.Front.Site).GetCurrentAreaID() %>/GroupDetail/<%#Eval("GroupID")%>.html'><%#Eval("Title")%></a></h3>
								<div class="price_box border spacing">
									<strong style=" width:90px; display:block">¥<%#Eval("Discount")%></strong>
									<a href='/<% =(Master as VK.Casemeet.Web.Front.Site).GetCurrentAreaID() %>/GroupDetail/<%#Eval("GroupID")%>.html'><input class="submit spacing" type="button"></a>
									<table>
										<tbody>
											<tr>
												<th class="market_price">市场价</th>
												<th class="discount">折扣</th>
												<th>您节省</th>
											</tr>
											<tr>
												<td class="market_price"><del>¥<%#Eval("Price")%></del></td>
												<td><%#DisCount(Eval("Price").ToString(),Eval("Discount").ToString())%>折</td>
												<td>¥<%#Convert.ToInt32(Eval("Price"))-Convert.ToInt32(Eval("Discount"))%></td>
											</tr>
										</tbody>
									</table><div class="clear"></div>
								</div>
								<div class="time">还剩：<span class="reducetime"><%#Eval("EndingTime")%></span>  已有<em><%#Eval("SigupTotal")%></em>人报名</div>
							</div>
							<div class="img_box"><img src='<%#Eval("Foucsmap") %>'></div><div class="clear"></div>
						</li>
                    </ItemTemplate>
                    <FooterTemplate></ul></FooterTemplate>
                    </asp:Repeater>
					
						
		
					
					<webdiyer:AspNetPager ID="aspNetPager" runat="server" CssClass="pagination" CurrentPageButtonClass="current" 
                        onpagechanged="aspNetPager_PageChanged" PageIndexBoxType="DropDownList" PageSize="5" 
                        SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" 
                        CustomInfoHTML="<span>第 %currentPageIndex%/%pageCount% 页</span>" 
                        ShowCustomInfoSection="Left" CustomInfoSectionWidth="28%" 
                        NumericButtonCount="5" Width="100%" UrlPaging="True" FirstLastButtonsClass="marlf10" FirstPageText="首页" 
                        LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" CurrentPageButtonPosition="Center" 
                        ShowPageIndexBox="Never">
                    </webdiyer:AspNetPager>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>

    <script type="text/javascript">

        $(function () {
            $(".reducetime").each(function () {
                GroupTime($(this), $(this).html());
            });

        });
        ///团购倒计时
        function GroupTime(obj, grouptime) {

            this.Show = function () {
                var endtime = new Date(grouptime);
                var nowtime = new Date();
                var leftsecond = parseInt((endtime.getTime() - nowtime.getTime()) / 1000);
                var day = parseInt(leftsecond / 3600 / 24);
                var hour = parseInt((leftsecond / 3600) % 24);
                var minute = parseInt((leftsecond / 60) % 60);
                var ssecond = parseInt(leftsecond % 60);
                
                if (leftsecond <= 0) {
                    obj.html("很遗憾，活动已经结束啦！");
                    clearInterval(Interval);
                    return
                }
                obj.html(day+"天 " + hour + "小时" + minute + "分" + ssecond + "秒");
            }
            var Interval = setInterval(this.Show, 100);
        }



    
    </script>
</asp:Content>
